Circuit for correcting chromatic abberation through sharpening

ABSTRACT

Embodiments relate to axial chromatic aberration (ACA) reduction of raw image data generated by image sensors. A chromatic aberration reduction circuit performs chromatic aberration reduction on the raw image data to correct the ACA in the full color images through sharpening that has been clamped to reduce sharpening overshoot.

BACKGROUND 1. Field of the Disclosure

The present disclosure relates to a circuit for processing images andmore specifically to a circuit for performing chromatic aberrationreduction on images through image sharpening.

2. Description of the Related Arts

Image data captured by an image sensor or received from other datasources is often processed in an image processing pipeline beforefurther processing or consumption. For example, raw image data may becorrected, filtered, or otherwise modified before being provided tosubsequent components such as a video encoder. To perform corrections orenhancements for captured image data, various components, unit stages ormodules may be employed.

Such an image processing pipeline may be structured so that correctionsor enhancements to the captured image data can be performed in anexpedient way without consuming other system resources. Although manyimage processing algorithms may be performed by executing softwareprograms on central processing unit (CPU), execution of such programs onthe CPU would consume significant bandwidth of the CPU and otherperipheral resources as well as increase power consumption. Hence, imageprocessing pipelines are often implemented as a hardware componentseparate from the CPU and dedicated to performing one or more imageprocessing algorithms.

When a wide-angle lens (e.g., a fisheye lens) is used to generate theimage data, the refraction angle of light with different wavelengthvaries thereby manifesting itself on the image sensor as shifted focalpoints that are not aligned among red, green, and blue color channels.Thus, color fringing is present at sharp and high contrast edges offull-color images generated from the image data.

SUMMARY

Embodiments of the present disclosure relate to a circuit for correctingaxial chromatic aberration generated by image sensors. In oneembodiment, an image processor circuit receives pixel values of pixelsof a color in raw input image data. The image processor circuitgenerates sharpening values for the received pixel values that improvesharpness of the corresponding pixels thereby reducing chromaticaberrations. However, the sharpening values may over sharpen the pixelvalues resulting in artifacts in a full-color image generated based onthe sharpening values. To reduce the artifacts, the image processorcircuit clamps the amount of sharpening that is applied to the pixelvalues. By clamping the sharpening, the image processor circuit reducessharpening overshoot that results in the artifacts while also correctingaxial chromatic aberrations due to the usage of a wide-angle lens togenerate the raw input image data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a high-level diagram of an electronic device, according to oneembodiment

FIG. 2 is a block diagram illustrating components in the electronicdevice, according to one embodiment.

FIG. 3 is a block diagram illustrating image processing pipelinesimplemented using an image signal processor, according to oneembodiment.

FIGS. 4A and 4B are conceptual diagrams illustrating longitudinal/axialchromatic aberration and lateral/transverse chromatic aberration,according to one embodiment.

FIG. 5 is a conceptual diagram illustrating raw image data generated byan image sensor using a wide-angle lens, according to one embodiment.

FIG. 6 is a block diagram illustrating a detailed view of a chromaticaberration reduction (CAR) circuit, according to one embodiment.

FIG. 7 is a diagram illustrating pixel neighbors of a given pixel,according to one embodiment.

FIG. 8 is a flowchart illustrating a method of performing chromaticaberration reduction to reduce color fringing of raw image data,according to one embodiment.

The figures depict, and the detail description describes, variousnon-limiting embodiments for purposes of illustration only.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments, examples of whichare illustrated in the accompanying drawings. In the following detaileddescription, numerous specific details are set forth in order to providea thorough understanding of the various described embodiments. However,the described embodiments may be practiced without these specificdetails. In other instances, well-known methods, procedures, components,circuits, and networks have not been described in detail so as not tounnecessarily obscure aspects of the embodiments.

Embodiments of the present disclosure relate to axial chromaticaberration (ACA) reduction of raw image data generated by image sensors.In one embodiment, raw image data may be in a Bayer color filter array(CFA) pattern (hereinafter also referred to as a “Bayer pattern”). Afull-color image created from a Bayer pattern that is generated by animage sensor using a wide-angle lens typically has ACA and lateralchromatic aberration (LCA). For a wide-angle lens, the refraction anglefor light with different wavelengths varies and manifests itself onimage sensors as shifted focal points that are misaligned among red,green, and blue color channels and results in color fringing at sharpand high contrast edges in the full color image. A chromatic aberrationreduction circuit performs chromatic aberration reduction on raw imagedata captured with the wide-angle lens to correct the resulting ACA inthe full color images through image sharpening that has been clamped toalso reduce artifacts due to sharpening overshoot.

Exemplary Electronic Device

Embodiments of electronic devices, user interfaces for such devices, andassociated processes for using such devices are described. In someembodiments, the device is a portable communications device, such as amobile telephone, that also contains other functions, such as personaldigital assistant (PDA) and/or music player functions. Exemplaryembodiments of portable multifunction devices include, withoutlimitation, the iPhone®, iPod Touch®, Apple Watch®, and iPad® devicesfrom Apple Inc. of Cupertino, Calif. Other portable electronic devices,such as wearables, laptops or tablet computers, are optionally used. Insome embodiments, the device is not a portable communications device,but is a desktop computer or other computing device that is not designedfor portable use. In some embodiments, the disclosed electronic devicemay include a touch sensitive surface (e.g., a touch screen displayand/or a touch pad). An example electronic device described below inconjunction with FIG. 1 (e.g., device 100) may include a touch-sensitivesurface for receiving user input. The electronic device may also includeone or more other physical user-interface devices, such as a physicalkeyboard, a mouse and/or a joystick.

FIG. 1 is a high-level diagram of an electronic device 100, according toone embodiment. Device 100 may include one or more physical buttons,such as a “home” or menu button 104. Menu button 104 is, for example,used to navigate to any application in a set of applications that areexecuted on device 100. In some embodiments, menu button 104 includes afingerprint sensor that identifies a fingerprint on menu button 104. Thefingerprint sensor may be used to determine whether a finger on menubutton 104 has a fingerprint that matches a fingerprint stored forunlocking device 100. Alternatively, in some embodiments, menu button104 is implemented as a soft key in a graphical user interface (GUI)displayed on a touch screen.

In some embodiments, device 100 includes touch screen 150, menu button104, push button 106 for powering the device on/off and locking thedevice, volume adjustment buttons 108, Subscriber Identity Module (SIM)card slot 110, head set jack 112, and docking/charging external port124. Push button 106 may be used to turn the power on/off on the deviceby depressing the button and holding the button in the depressed statefor a predefined time interval; to lock the device by depressing thebutton and releasing the button before the predefined time interval haselapsed; and/or to unlock the device or initiate an unlock process. Inan alternative embodiment, device 100 also accepts verbal input foractivation or deactivation of some functions through microphone 113. Thedevice 100 includes various components including, but not limited to, amemory (which may include one or more computer readable storagemediums), a memory controller, one or more central processing units(CPUs), a peripherals interface, an RF circuitry, an audio circuitry,speaker 111, microphone 113, input/output (I/O) subsystem, and otherinput or control devices. Device 100 may include one or more imagesensors 164, one or more proximity sensors 166, and one or moreaccelerometers 168. Device 100 may include more than one type of imagesensors 164. Each type may include more than one image sensor 164. Forexample, one type of image sensors 164 may be cameras and another typeof image sensors 164 may be infrared sensors that may be used for facerecognition. In addition or alternatively, the image sensors 164 may beassociated with different lens configuration. For example, device 100may include rear image sensors, one with a wide-angle lens and anotherwith as a telephoto lens. The device 100 may include components notshown in FIG. 1 such as an ambient light sensor, a dot projector and aflood illuminator.

Device 100 is only one example of an electronic device, and device 100may have more or fewer components than listed above, some of which maybe combined into a component or have a different configuration orarrangement. The various components of device 100 listed above areembodied in hardware, software, firmware or a combination thereof,including one or more signal processing and/or application specificintegrated circuits (ASICs). While the components in FIG. 1 are shown asgenerally located on the same side as the touch screen 150, one or morecomponents may also be located on an opposite side of device 100. Forexample, the front side of device 100 may include an infrared imagesensor 164 for face recognition and another image sensor 164 as thefront camera of device 100. The back side of device 100 may also includeadditional two image sensors 164 as the rear cameras of device 100.

FIG. 2 is a block diagram illustrating components in device 100,according to one embodiment. Device 100 may perform various operationsincluding image processing. For this and other purposes, the device 100may include, among other components, image sensor 202, system-on-a chip(SOC) component 204, system memory 230, persistent storage (e.g., flashmemory) 228, orientation sensor 234, and display 216. The components asillustrated in FIG. 2 are merely illustrative. For example, device 100may include other components (such as speaker or microphone) that arenot illustrated in FIG. 2. Further, some components (such as orientationsensor 234) may be omitted from device 100.

Image sensors 202 are components for capturing image data. Each of theimage sensors 202 may be embodied, for example, as a complementarymetal-oxide-semiconductor (CMOS) active-pixel sensor, a camera, videocamera, or other devices. Image sensors 202 generate raw image data thatis sent to SOC component 204 for further processing. In someembodiments, the image data processed by SOC component 204 is displayedon display 216, stored in system memory 230, persistent storage 228 orsent to a remote computing device via network connection. Image data ina Bayer pattern or other patterns that have a monochromatic color valuefor each pixel may be referred to as “raw image data” herein. An imagesensor 202 may also include optical and mechanical components thatassist image sensing components (e.g., pixels) to capture images. Theoptical and mechanical components may include an aperture, a lenssystem, and an actuator that controls the lens position of the imagesensor 202.

Motion sensor 234 is a component or a set of components for sensingmotion of device 100. Motion sensor 234 may generate sensor signalsindicative of orientation and/or acceleration of device 100. The sensorsignals are sent to SOC component 204 for various operations such asturning on device 100 or rotating images displayed on display 216.

Display 216 is a component for displaying images as generated by SOCcomponent 204. Display 216 may include, for example, a liquid crystaldisplay (LCD) device or an organic light emitting diode (OLED) device.Based on data received from SOC component 204, display 116 may displayvarious images, such as menus, selected operating parameters, imagescaptured by image sensor 202 and processed by SOC component 204, and/orother information received from a user interface of device 100 (notshown).

System memory 230 is a component for storing instructions for executionby SOC component 204 and for storing data processed by SOC component204. System memory 230 may be embodied as any type of memory including,for example, dynamic random access memory (DRAM), synchronous DRAM(SDRAM), double data rate (DDR, DDR2, DDR3, etc.) RAMBUS DRAM (RDRAM),static RAM (SRAM) or a combination thereof. In some embodiments, systemmemory 230 may store pixel data or other image data or statistics invarious formats.

Persistent storage 228 is a component for storing data in a non-volatilemanner. Persistent storage 228 retains data even when power is notavailable. Persistent storage 228 may be embodied as read-only memory(ROM), flash memory or other non-volatile random access memory devices.

SOC component 204 is embodied as one or more integrated circuit (IC)chip and performs various data processing processes. SOC component 204may include, among other subcomponents, image signal processor (ISP)206, a central processor unit (CPU) 208, a network interface 210, motionsensor interface 212, display controller 214, graphics processor (GPU)220, memory controller 222, video encoder 224, storage controller 226,and various other input/output (I/O) interfaces 218, and bus 232connecting these subcomponents. SOC component 204 may include more orfewer subcomponents than those shown in FIG. 2.

ISP 206 is hardware that performs various stages of an image processingpipeline. In some embodiments, ISP 206 may receive raw image data fromimage sensor 202, and process the raw image data into a form that isusable by other subcomponents of SOC component 204 or components ofdevice 100. ISP 206 may perform various image-manipulation operationssuch as image translation operations, horizontal and vertical scaling,color space conversion and/or image stabilization transformations, asdescribed below in detail with reference to FIG. 3.

CPU 208 may be embodied using any suitable instruction set architecture,and may be configured to execute instructions defined in thatinstruction set architecture. CPU 208 may be general-purpose or embeddedprocessors using any of a variety of instruction set architectures(ISAs), such as the x86, PowerPC, SPARC, RISC, ARM or MIPS ISAs, or anyother suitable ISA. Although a single CPU is illustrated in FIG. 2, SOCcomponent 204 may include multiple CPUs. In multiprocessor systems, eachof the CPUs may commonly, but not necessarily, implement the same ISA.

Graphics processing unit (GPU) 220 is graphics processing circuitry forperforming operations on graphical data. For example, GPU 220 may renderobjects to be displayed into a frame buffer (e.g., one that includespixel data for an entire frame). GPU 220 may include one or moregraphics processors that may execute graphics software to perform a partor all of the graphics operation, or hardware acceleration of certaingraphics operations.

I/O interfaces 218 are hardware, software, firmware or combinationsthereof for interfacing with various input/output components in device100. I/O components may include devices such as keypads, buttons, audiodevices, and sensors such as a global positioning system. I/O interfaces218 process data for sending data to such I/O components or process datareceived from such I/O components.

Network interface 210 is a subcomponent that enables data to beexchanged between devices 100 and other devices via one or more networks(e.g., carrier or agent devices). For example, video or other image datamay be received from other devices via network interface 210 and bestored in system memory 230 for subsequent processing (e.g., via aback-end interface to image signal processor 206, such as discussedbelow in FIG. 3) and display. The networks may include, but are notlimited to, Local Area Networks (LANs) (e.g., an Ethernet or corporatenetwork) and Wide Area Networks (WANs). The image data received vianetwork interface 210 may undergo image processing processes by ISP 206.

Motion sensor interface 212 is circuitry for interfacing with motionsensor 234. Motion sensor interface 212 receives sensor information frommotion sensor 234 and processes the sensor information to determine theorientation or movement of the device 100.

Display controller 214 is circuitry for sending image data to bedisplayed on display 216. Display controller 214 receives the image datafrom ISP 206, CPU 208, graphic processor or system memory 230 andprocesses the image data into a format suitable for display on display216.

Memory controller 222 is circuitry for communicating with system memory230. Memory controller 222 may read data from system memory 230 forprocessing by ISP 206, CPU 208, GPU 220 or other subcomponents of SOCcomponent 204. Memory controller 222 may also write data to systemmemory 230 received from various subcomponents of SOC component 204.

Video encoder 224 is hardware, software, firmware or a combinationthereof for encoding video data into a format suitable for storing inpersistent storage 228 or for passing the data to network interface 210for transmission over a network to another device.

In some embodiments, one or more subcomponents of SOC component 204 orsome functionality of these subcomponents may be performed by softwarecomponents executed on ISP 206, CPU 208 or GPU 220. Such softwarecomponents may be stored in system memory 230, persistent storage 228 oranother device communicating with device 100 via network interface 210.

Image data or video data may flow through various data paths within SOCcomponent 204. In one example, raw image data may be generated from theimage sensors 202 and processed by ISP 206, and then sent to systemmemory 230 via bus 232 and memory controller 222. After the image datais stored in system memory 230, it may be accessed by video encoder 224for encoding or by display 116 for displaying via bus 232.

In another example, image data is received from sources other than theimage sensors 202. For example, video data may be streamed, downloaded,or otherwise communicated to the SOC component 204 via wired or wirelessnetwork. The image data may be received via network interface 210 andwritten to system memory 230 via memory controller 222. The image datamay then be obtained by ISP 206 from system memory 230 and processedthrough one or more image processing pipeline stages, as described belowin detail with reference to FIG. 3. The image data may then be returnedto system memory 230 or be sent to video encoder 224, display controller214 (for display on display 216), or storage controller 226 for storageat persistent storage 228.

Example Image Signal Processing Pipelines

FIG. 3 is a block diagram illustrating image processing pipelinesimplemented using ISP 206, according to one embodiment. In theembodiment of FIG. 3, ISP 206 is coupled to an image sensor system 201that includes one or more image sensors 202A through 202N (hereinaftercollectively referred to as “image sensors 202” or also referredindividually as “image sensor 202”) to receive raw image data. The imagesensor system 201 may include one or more sub-systems that control theimage sensors 202 individually. In some cases, each image sensor 202 mayoperate independently while, in other cases, the image sensors 202 mayshare some components. For example, in one embodiment, two or more imagesensors 202 may share the same circuit board that controls themechanical components of the image sensors (e.g., actuators that changethe lens positions of each image sensor). The image sensing componentsof an image sensor 202 may include different types of image sensingcomponents that may provide raw image data in different forms to the ISP206. For example, in one embodiment, the image sensing components mayinclude a plurality of focus pixels that are used for auto-focusing anda plurality of image pixels that are used for capturing images. Inanother embodiment, the image sensing pixels may be used for bothauto-focusing and image capturing purposes.

ISP 206 implements an image processing pipeline which may include a setof stages that process image information from creation, capture orreceipt to output. ISP 206 may include, among other components, sensorinterface 302, central control 320, front-end pipeline stages 330,back-end pipeline stages 340, image statistics module 304, vision module322, back-end interface 342, output interface 316, and auto-focuscircuits 350A through 350N (hereinafter collectively referred to as“auto-focus circuits 350” or referred individually as “auto-focuscircuits 350”). ISP 206 may include other components not illustrated inFIG. 3 or may omit one or more components illustrated in FIG. 3.

In one or more embodiments, different components of ISP 206 processimage data at different rates. In the embodiment of FIG. 3, front-endpipeline stages 330 (e.g., raw processing stage 306 and resampleprocessing stage 308) may process image data at an initial rate. Thus,the various different techniques, adjustments, modifications, or otherprocessing operations performed by these front-end pipeline stages 330at the initial rate. For example, if the front-end pipeline stages 330processes 2 pixels per clock cycle, then raw processing stage 306operations (e.g., black level compensation, highlight recovery anddefective pixel correction) may process 2 pixels of image data at atime. In contrast, one or more back-end pipeline stages 340 may processimage data at a different rate less than the initial data rate. Forexample, in the embodiment of FIG. 3, back-end pipeline stages 340(e.g., noise processing stage 310, color processing stage 312, andoutput rescale 314) may be processed at a reduced rate (e.g., 1 pixelper clock cycle).

Raw image data captured by image sensors 202 may be transmitted todifferent components of ISP 206 in different manners. In one embodiment,raw image data corresponding to the focus pixels may be sent to theauto-focus circuits 350 while raw image data corresponding to the imagepixels may be sent to the sensor interface 302. In another embodiment,raw image data corresponding to both types of pixels may simultaneouslybe sent to both the auto-focus circuits 350 and the sensor interface302.

Auto-focus circuits 350 may include hardware circuits that analyze rawimage data to determine an appropriate lens position of each imagesensor 202. In one embodiment, the raw image data may include data thatis transmitted from image sensing pixels that specialize in imagefocusing. In another embodiment, raw image data from image capturepixels may also be used for auto-focusing purpose. An auto-focus circuit350 may perform various image processing operations to generate datathat determines the appropriate lens position. The image processingoperations may include cropping, binning, image compensation, scaling togenerate data that is used for auto-focusing purpose. The auto-focusingdata generated by auto-focus circuits 350 may be fed back to the imagesensor system 201 to control the lens positions of the image sensors202. For example, an image sensor 202 may include a control circuit thatanalyzes the auto-focusing data to determine a command signal that issent to an actuator associated with the lens system of the image sensorto change the lens position of the image sensor. The data generated bythe auto-focus circuits 350 may also be sent to other components of theISP 206 for other image processing purposes. For example, some of thedata may be sent to image statistics 304 to determine informationregarding auto-exposure.

The auto-focus circuits 350 may be individual circuits that are separatefrom other components such as image statistics 304, sensor interface302, front-end 330 and back-end 340. This allows the ISP 206 to performauto-focusing analysis independent of other image processing pipelines.For example, the ISP 206 may analyze raw image data from the imagesensor 202A to adjust the lens position of image sensor 202A using theauto-focus circuit 350A while performing downstream image processing ofthe image data from image sensor 202B simultaneously. In one embodiment,the number of auto-focus circuits 350 may correspond to the number ofimage sensors 202. In other words, each image sensor 202 may have acorresponding auto-focus circuit that is dedicated to the auto-focusingof the image sensor 202. The device 100 may perform auto focusing fordifferent image sensors 202 even if one or more image sensors 202 arenot in active use. This allows a seamless transition between two imagesensors 202 when the device 100 switches from one image sensor 202 toanother. For example, in one embodiment, a device 100 may include awide-angle camera and a telephoto camera as a dual back camera systemfor photo and image processing. The device 100 may display imagescaptured by one of the dual cameras and may switch between the twocameras from time to time. The displayed images may seamlesslytransition from image data captured by one image sensor 202 to imagedata captured by another image sensor without waiting for the secondimage sensor 202 to adjust its lens position because two or moreauto-focus circuits 350 may continuously provide auto-focus data to theimage sensor system 201.

Raw image data captured by different image sensors 202 may also betransmitted to sensor interface 302. Sensor interface 302 receives rawimage data from image sensor 202 and processes the raw image data intoan image data processable by other stages in the pipeline. Sensorinterface 302 may perform various preprocessing operations, such asimage cropping, binning or scaling to reduce image data size. In someembodiments, pixels are sent from the image sensor 202 to sensorinterface 302 in raster order (e.g., horizontally, line by line). Thesubsequent processes in the pipeline may also be performed in rasterorder and the result may also be output in raster order. Although only asingle image sensor and a single sensor interface 302 are illustrated inFIG. 3, when more than one image sensor is provided in device 100, acorresponding number of sensor interfaces may be provided in ISP 206 toprocess raw image data from each image sensor.

Front-end pipeline stages 330 process image data in raw or full-colordomains. Front-end pipeline stages 330 may include, but are not limitedto, raw processing stage 306 and resample processing stage 308. A rawimage data may be in Bayer raw format, for example. In Bayer raw imageformat, pixel data with values specific to a particular color (insteadof all colors) is provided in each pixel. In an image capturing sensor,image data is typically provided in a Bayer pattern. Raw processingstage 306 may process image data in a Bayer raw format.

The operations performed by raw processing stage 306 include, but arenot limited, sensor linearization, black level compensation, fixedpattern noise reduction, defective pixel correction, raw noisefiltering, lens shading correction, white balance gain, and highlightrecovery. Sensor linearization refers to mapping non-linear image datato linear space for other processing. Black level compensation refers toproviding digital gain, offset and clip independently for each colorcomponent (e.g., Gr, R, B, Gb) of the image data. Fixed pattern noisereduction refers to removing offset fixed pattern noise and gain fixedpattern noise by subtracting a dark frame from an input image andmultiplying different gains to pixels. Defective pixel correction refersto detecting defective pixels, and then replacing defective pixelvalues. Raw noise filtering refers to reducing the noise of image databy averaging neighbor pixels that are similar in brightness. Highlightrecovery refers to estimating pixel values for those pixels that areclipped (or nearly clipped) from other channels. Lens shading correctionrefers to applying a gain per pixel to compensate for a dropoff inintensity roughly proportional to a distance from a lens optical center.White balance gain refers to providing digital gains for white balance,offset and clip independently for all color components (e.g., Gr, R, B,Gb in Bayer format). Chromatic aberration reduction is performed bychromatic aberration reduction circuit (CAR) 307 and refers tocorrecting chromatic aberrations in raw image data images resulting fromthe use of a wide-angle lens to generate the images. Components of ISP206 may convert raw image data into image data in full-color domain, andthus, raw processing stage 306 may process image data in the full-colordomain in addition to or instead of raw image data.

Resample processing stage 308 performs various operations to convert,resample, or scale image data received from raw processing stage 306.Operations performed by resample processing stage 308 may include, butnot limited to, demosaic operation, per-pixel color correctionoperation, Gamma mapping operation, color space conversion anddownscaling or sub-band splitting. Demosaic operation refers toconverting or interpolating missing color samples from raw image data(for example, in a Bayer pattern) to output image data into a full-colordomain. Demosaic operation may include low pass directional filtering onthe interpolated samples to obtain full-color pixels. Per-pixel colorcorrection operation refers to a process of performing color correctionon a per-pixel basis using information about relative noise standarddeviations of each color channel to correct color without amplifyingnoise in the image data. Gamma mapping refers to converting image datafrom input image data values to output data values to perform gammacorrection. For the purpose of Gamma mapping, lookup tables (or otherstructures that index pixel values to another value) for different colorcomponents or channels of each pixel (e.g., a separate lookup table forR, G, and B color components) may be used. Color space conversion refersto converting color space of an input image data into a differentformat. In one embodiment, resample processing stage 308 converts RGBformat into YCbCr format for further processing.

Central control module 320 may control and coordinate overall operationof other components in ISP 206. Central control module 320 performsoperations including, but not limited to, monitoring various operatingparameters (e.g., logging clock cycles, memory latency, quality ofservice, and state information), updating or managing control parametersfor other components of ISP 206, and interfacing with sensor interface302 to control the starting and stopping of other components of ISP 206.For example, central control module 320 may update programmableparameters for other components in ISP 206 while the other componentsare in an idle state. After updating the programmable parameters,central control module 320 may place these components of ISP 206 into arun state to perform one or more operations or tasks. Central controlmodule 320 may also instruct other components of ISP 206 to store imagedata (e.g., by writing to system memory 230 in FIG. 2) before, during,or after resample processing stage 308. In this way full-resolutionimage data in raw or full-color domain format may be stored in additionto or instead of processing the image data output from resampleprocessing stage 308 through backend pipeline stages 340.

Image statistics module 304 performs various operations to collectstatistic information associated with the image data. The operations forcollecting statistics information may include, but not limited to,sensor linearization, replace patterned defective pixels, sub-sample rawimage data, detect and replace non-patterned defective pixels, blacklevel compensation, lens shading correction, and inverse black levelcompensation. After performing one or more of such operations,statistics information such as 3A statistics (Auto white balance (AWB),auto exposure (AE), histograms (e.g., 2D color or component) and anyother image data information may be collected or tracked. In someembodiments, certain pixels' values, or areas of pixel values may beexcluded from collections of certain statistical data when precedingoperations identify clipped pixels. Although only a single statisticsmodule 304 is illustrated in FIG. 3, multiple image statistics modulesmay be included in ISP 206. For example, each image sensor 202 maycorrespond to an individual image statistics unit 304. In suchembodiments, each statistic module may be programmed by central controlmodule 320 to collect different information for the same or differentimage data.

Vision module 322 performs various operations to facilitate computervision operations at CPU 208 such as facial detection in image data. Thevision module 322 may perform various operations includingpre-processing, global tone-mapping and Gamma correction, vision noisefiltering, resizing, keypoint detection, generation ofhistogram-of-orientation gradients (HOG) and normalized crosscorrelation (NCC). The pre-processing may include subsampling or binningoperation and computation of luminance if the input image data is not inYCrCb format. Global mapping and Gamma correction can be performed onthe pre-processed data on luminance image. Vision noise filtering isperformed to remove pixel defects and reduce noise present in the imagedata, and thereby, improve the quality and performance of subsequentcomputer vision algorithms. Such vision noise filtering may includedetecting and fixing dots or defective pixels, and performing bilateralfiltering to reduce noise by averaging neighbor pixels of similarbrightness. Various vision algorithms use images of different sizes andscales. Resizing of an image is performed, for example, by binning orlinear interpolation operation. Keypoints are locations within an imagethat are surrounded by image patches well suited to matching in otherimages of the same scene or object. Such keypoints are useful in imagealignment, computing camera pose and object tracking. Keypoint detectionrefers to the process of identifying such keypoints in an image. HOGprovides descriptions of image patches for tasks in mage analysis andcomputer vision. HOG can be generated, for example, by (i) computinghorizontal and vertical gradients using a simple difference filter, (ii)computing gradient orientations and magnitudes from the horizontal andvertical gradients, and (iii) binning the gradient orientations. NCC isthe process of computing spatial cross-correlation between a patch ofimage and a kernel.

Back-end interface 342 receives image data from other image sources thanimage sensor 102 and forwards it to other components of ISP 206 forprocessing. For example, image data may be received over a networkconnection and be stored in system memory 230. Back-end interface 342retrieves the image data stored in system memory 230 and provides it toback-end pipeline stages 340 for processing. One of many operations thatare performed by back-end interface 342 is converting the retrievedimage data to a format that can be utilized by back-end processingstages 340. For instance, back-end interface 342 may convert RGB, YCbCr4:2:0, or YCbCr 4:2:2 formatted image data into YCbCr 4:4:4 colorformat.

Back-end pipeline stages 340 processes image data according to aparticular full-color format (e.g., YCbCr 4:4:4 or RGB). In someembodiments, components of the back-end pipeline stages 340 may convertimage data to a particular full-color format before further processing.Back-end pipeline stages 340 may include, among other stages, noiseprocessing stage 310 and color processing stage 312. Back-end pipelinestages 340 may include other stages not illustrated in FIG. 3.

Noise processing stage 310 performs various operations to reduce noisein the image data. The operations performed by noise processing stage310 include, but are not limited to, color space conversion,gamma/de-gamma mapping, temporal filtering, noise filtering, lumasharpening, and chroma noise reduction. The color space conversion mayconvert an image data from one color space format to another color spaceformat (e.g., RGB format converted to YCbCr format). Gamma/de-gammaoperation converts image data from input image data values to outputdata values to perform gamma correction or reverse gamma correction.Temporal filtering filters noise using a previously filtered image frameto reduce noise. For example, pixel values of a prior image frame arecombined with pixel values of a current image frame. Noise filtering mayinclude, for example, spatial noise filtering. Luma sharpening maysharpen luma values of pixel data while chroma suppression may attenuatechroma to gray (e.g. no color). In some embodiment, the luma sharpeningand chroma suppression may be performed simultaneously with spatialnoise filtering. The aggressiveness of noise filtering may be determineddifferently for different regions of an image. Spatial noise filteringmay be included as part of a temporal loop implementing temporalfiltering. For example, a previous image frame may be processed by atemporal filter and a spatial noise filter before being stored as areference frame for a next image frame to be processed. In otherembodiments, spatial noise filtering may not be included as part of thetemporal loop for temporal filtering (e.g., the spatial noise filter maybe applied to an image frame after it is stored as a reference imageframe and thus the reference frame is not spatially filtered.

Color processing stage 312 may perform various operations associatedwith adjusting color information in the image data. The operationsperformed in color processing stage 312 include, but are not limited to,local tone mapping, gain/offset/clip, color correction,three-dimensional color lookup, gamma conversion, and color spaceconversion. Local tone mapping refers to spatially varying local tonecurves in order to provide more control when rendering an image. Forinstance, a two-dimensional grid of tone curves (which may be programmedby the central control module 320) may be bi-linearly interpolated suchthat smoothly varying tone curves are created across an image. In someembodiments, local tone mapping may also apply spatially varying andintensity varying color correction matrices, which may, for example, beused to make skies bluer while turning down blue in the shadows in animage. Digital gain/offset/clip may be provided for each color channelor component of image data. Color correction may apply a colorcorrection transform matrix to image data. 3D color lookup may utilize athree-dimensional array of color component output values (e.g., R, G, B)to perform advanced tone mapping, color space conversions, and othercolor transforms. Gamma conversion may be performed, for example, bymapping input image data values to output data values in order toperform gamma correction, tone mapping, or histogram matching. Colorspace conversion may be implemented to convert image data from one colorspace to another (e.g., RGB to YCbCr). Other processing techniques mayalso be performed as part of color processing stage 312 to perform otherspecial image effects, including black and white conversion, sepia toneconversion, negative conversion, or solarize conversion.

Output rescale module 314 may resample, transform and correct distortionon the fly as the ISP 206 processes image data. Output rescale module314 may compute a fractional input coordinate for each pixel and usesthis fractional input coordinate to interpolate an output pixel via apolyphase resampling filter. A fractional input coordinate may beproduced from a variety of possible transforms of an output coordinate,such as resizing or cropping an image (e.g., via a simple horizontal andvertical scaling transform), rotating and shearing an image (e.g., vianon-separable matrix transforms), perspective warping (e.g., via anadditional depth transform) and per-pixel perspective divides appliedpiecewise in strips to account for changes in image sensor during imagedata capture (e.g., due to a rolling shutter), and geometric distortioncorrection (e.g., via computing a radial distance from the opticalcenter in order to index an interpolated radial gain table, and applyinga radial perturbance to a coordinate to account for a radial lensdistortion).

Output rescale module 314 may apply transforms to image data as it isprocessed at output rescale module 314. Output rescale module 314 mayinclude horizontal and vertical scaling components. The vertical portionof the design may implement a series of image data line buffers to holdthe “support” needed by the vertical filter. As ISP 206 may be astreaming device, it may be that only the lines of image data in afinite-length sliding window of lines are available for the filter touse. Once a line has been discarded to make room for a new incomingline, the line may be unavailable. Output rescale module 314 maystatistically monitor computed input Y coordinates over previous linesand use it to compute an optimal set of lines to hold in the verticalsupport window. For each subsequent line, output rescale module mayautomatically generate a guess as to the center of the vertical supportwindow. In some embodiments, output rescale module 314 may implement atable of piecewise perspective transforms encoded as digital differenceanalyzer (DDA) steppers to perform a per-pixel perspectivetransformation between input image data and output image data in orderto correct artifacts and motion caused by sensor motion during thecapture of the image frame. Output rescale may provide image data viaoutput interface 316 to various other components of device 100, asdiscussed above with regard to FIGS. 1 and 2.

In various embodiments, the functionally of components 302 through 350may be performed in a different order than the order implied by theorder of these functional units in the image processing pipelineillustrated in FIG. 3, or may be performed by different functionalcomponents than those illustrated in FIG. 3. Moreover, the variouscomponents as described in FIG. 3 may be embodied in variouscombinations of hardware, firmware or software.

Chromatic Aberration Reduction

In general, chromatic aberration is caused by the inability of a lens tofocus different wavelengths of light (different colors of light) to thesame point. FIG. 4A illustrates an example of longitudinal (axial)chromatic aberration. As shown in FIG. 4A, wide-angle lens 401 refractslight 403 such that different wavelengths of light (e.g., red light,green light, and blue light) are focused at different distances from thewide-angle lens 401 along the optical axis 405. FIG. 4B illustrateslateral (transverse) chromatic aberration, according to one embodiment.As shown in FIG. 4B, the wide-angle lens 401 refracts light 403 suchthat the different wavelengths (e.g., red light, green light, and bluelight) are focused at different positions on the focal plane 407.Chromatic aberration due to the usage of the wide-angle lens 401 asdescribed with respect to FIGS. 4A and 4B manifests itself as colorfringing at edges in full color images.

FIG. 5 illustrates raw image data generated using light 403 captured byimage sensor 202 using the wide-angle lens 401 in one embodiment. Asshown in FIG. 5, the raw image data is in a Bayer pattern 501. The Bayerpattern 501 includes alternating rows of red-green pixels and green-bluepixels. Generally, the Bayer pattern 501 includes more green pixels thanred or blue pixels due to the human eye being more sensitive to greenlight than both red light and blue light.

FIG. 6 is a block diagram illustrating a detailed view of the chromaticaberration reduction (CAR) circuit 307, according to one embodiment. TheCAR circuit 307 receives raw input image data 601 and generatescorrected raw image data 623 by correcting axial chromatic aberrations.In one embodiment, the raw input image data 601 is a Bayer pattern thatis generated by image sensor 202 using a wide-angle lens as describedwith respect to FIG. 5. A full-color image generated from the raw inputimage data 601 includes axial chromatic aberrations due to using thewide-angle lens to generate the raw input image data 601. By using thecorrected raw image data 623 to generate a full-color image rather thanthe raw input image data 601, axial chromatic aberrations in thefull-color image is reduced. The following embodiments are describedprimarily with the CAR circuit 307 receiving raw input image data 601.However, the CAR circuit 307 may also receive processed image data (forexample, in RGB or YCbCr format) and generate corrected image data bycorrecting chromatic aberrations.

In one or more embodiments, the CAR circuit 307 includes a sharpeningcircuit 603, sharpening clamp circuit 625, and a summation circuit 609.The CAR circuit 307 may have additional or fewer circuits than thoseshown in FIG. 6.

The sharpening circuit 603 receives the raw input image data 601. In oneembodiment, the raw input image data 601 includes pixel values for eachpixel in the raw input image data 601. Sharpening circuit 603 is acircuit that performs edge sharpening on the raw input image data 601(first in vertical direction followed by horizontal direction) andgenerates a delta value 613 (a sharpening value for each direction) asits output to the sharpening clamp circuit 625. Delta values 613represent a measure of sharpening performed on the raw input image data601 by the sharpening circuit 603. The measure of sharpening performedon the raw input image data 601 by the sharpening circuit 603 representsthe highest degree of sharpening applied to the raw input image data 601without clamping the degree of sharpening. Each delta value 613generated by the sharpening circuit 603 corresponds to one pixel in theraw input image data 601. In one or more embodiments, sharpening circuit603 is embodied as a bilateral filter or a high-pass filter thatperforms processing on the raw input image data 601. Thus, for example,delta value 613 may be a high frequency component of the raw input imagedata 601.

In one embodiment, the delta value 613 for each pixel (e.g., each redand blue pixel) describes the pixel value difference between thesharpened pixel value generated by the sharpening circuit 603 for thepixel and the original pixel value included in the raw input image data601. Referring to the example of FIG. 7 described below in detail, theraw input image data 601 includes a pixel value for blue pixel E whichis processed by the sharpening circuit 604 to generate a delta value 613for the blue pixel E that describes the difference between the sharpenedblue pixel value and the original blue pixel value for pixel E includedin the raw input image data 601.

In one embodiment, the sharpening circuit 603 performs sharpening on theraw input image data 601 and may sharpen a subset of the colors of theraw input image data, using an image sharpening technique well known inthe art. Assuming that the raw input image data 601 includes pixelvalues for three colors (e.g., red, green, and blue), the sharpeningcircuit 603 sharpens pixel values of pixels of two of the colors withoutsharpening pixel values of pixels of a remaining color in oneembodiment. For example, in the description herein, the sharpeningcircuit 603 sharpens pixel values of red and blue pixels withoutsharpening pixel values of green pixels. However, in other embodiments,the sharpening circuit 603 may sharpen pixel values of green pixels andpixel values of red or blue pixels without sharpening pixels of theremaining color.

The sharpening clamp circuit 625 receives the delta values 613 generatedby the sharpening circuit 603 and clamps the degree of sharpening in thedelta values 613. That is, the sharpening clamp circuit 625 limits thedegree of sharpening applied by the sharpening circuit on the raw inputimage data 601 to reduce sharpening overshoot. The sharpening clampcircuit 625 includes a predetermined sharpening circuit 605 and a clampcircuit 607 as shown in FIG. 6. However, in other embodiments thesharpening clamp circuit 625 may include other circuits than those shownin FIG. 6.

In one embodiment, the predetermined sharpening circuit 605 applies apredetermined sharpening strength to each delta value 613 received fromthe sharpening circuit 603 to generate a predetermined sharpening value617 for each delta value 613. The predetermined sharpening strengthdescribes the predetermined amount of sharpening that should be appliedto the raw input image data 601. In one embodiment, the predeterminedsharpening strength describes a minimum amount of sharpening to apply tothe raw input image data 601. In one embodiment, the predeterminedsharpening strength is a value stored in register of the predeterminedsharpening circuit 605. The predetermined sharpening strength 617 may beconfigurable by software or user setting.

In one embodiment, the predetermined sharpening circuit 605 generatesthe predetermined sharpening value 617 for each delta value 613 based ona product of the delta value 613 and the predetermined sharpeningstrength. As shown in FIG. 6, the predetermined sharpening circuit 605outputs the predetermined sharpening value 617 for each delta value 613to the summation circuit 609.

Furthermore, the predetermined sharpening circuit 605 also generates aresidual delta value 615 for each delta value 613 received from thesharpening circuit 603. The residual delta value 615 for each deltavalue 613 is a difference between the delta value 613 and thepredetermined sharpening value 617. In one embodiment, the predeterminedsharpening circuit 605 outputs the residual delta value 615 for eachdelta value 613 to the clamp circuit 607 as shown in FIG. 6.

The summation circuit 609 includes an adder circuit 611 and an addercircuit 621. Adder circuit 611 generates an adjusted raw pixel value 627for each target pixel from the raw input image data 601 (each red andblue pixel). In one embodiment, the adder circuit 611 generates theadjusted raw pixel value 627 for each target pixel by adding together(summing) the pixel value of the target pixel and the predeterminedsharpening value 617 that corresponds to the delta value 613 for thetarget pixel.

Referring back to the sharpening clamp circuit 625, the clamp circuit607 clamps (e.g., limits) the degree of sharpening applied to the rawimage data 601 by the sharpening circuit 603. By clamping the degree ofsharpening applied to the raw image data 601, the clamp circuit 607reduces sharpening overshoot which results in artifacts in thefull-color image generated from the corrected raw image data 623.

The clamp circuit 607 generates a clamped delta value 619 for eachresidual delta value 615 received from the predetermined sharpeningcircuit 605. The clamped delta value 619 describes the amount (e.g.,degree) of sharpening to apply to a pixel value from the raw input imagedata 601. In one embodiment, the clamp circuit 607 generates the clampeddelta value 619 for each target pixel based on the residual delta value615 for the target pixel, the adjusted raw pixel value 627 for thetarget pixel, and pixel values of the target pixel's neighboring pixels.

A target pixel's neighbors include vertical pixel neighbors andhorizontal pixel neighbors. The vertical pixel neighbors of a targetpixel include multiple pixels of a same color as the target pixel in thevertical direction (e.g., a first direction). In one embodiment, thevertical pixel neighbors include four pixels, but any number of pixelsmay be used. The horizontal pixel neighbors of the target pixel includemultiple green pixels that are immediately adjacent to the target pixelin the horizontal direction (e.g., a second direction). The horizontalpixel neighbors include two pixels in one embodiment. The horizontalpixel neighbors of the target pixel are green pixels regardless of thetarget pixel's color. Thus, the horizontal pixel neighbors of a redtarget pixel are green pixels and the horizontal pixel neighbors of ablue target pixel are also green pixels.

FIG. 7 illustrates the neighboring pixels of target pixel E for verticalsharpening. The vertical pixel neighbors of target pixel E includemultiple pixels in the vertical direction that are closest to the targetpixel E and are of the same color as the target pixel. In this example,the vertical pixel neighbors of target pixel E include blue pixels B₁,B₂, B₃, and B₄, and the horizontal pixel neighbors of target pixel E.The horizontal pixel neighbors of target pixel E are the green pixels G₁and G₂ that are immediately adjacent to the target pixel E in thehorizontal direction. Note that the target pixel E will also haveneighboring pixels for horizontal sharpening with horizontal pixelneighbors of target pixel E including multiple pixels in the horizontaldirection that are of the same color as the target pixel E and verticalpixel neighbors of target pixel E are the green pixels that areimmediately adjacent to the target pixel E in the vertical direction.

Referring back to FIG. 6, the clamp circuit 607 generates a clampeddelta value 619 for a target pixel based on the following factors: 1)the lowest pixel value of the target pixel's vertical neighbors, 2) thehighest pixel value of the target pixel's vertical neighbors, 3) anaverage pixel value of the target pixel's horizontal neighbors, 4) theadjusted raw pixel value 627 for the target pixel, and 5) the residualdelta value 615 for the target pixel. The clamp circuit 607 determinesthe locations of the target pixel's vertical neighbors based on theBayer pattern arrangement of the raw image data 601. After the verticalneighbors of the target pixel are identified, the clamp circuit 607identifies the lowest pixel value and the highest pixel value from thepixel values of the vertical neighbors of the target pixel. In theexample of FIG. 7, the clamp circuit 607 determines the lowest pixelvalue and the highest pixel value amongst the pixel values from bluepixels B₁, B₂, B₃, and B₄ which are the vertical pixel neighbors oftarget pixel 701.

In one embodiment, the clamp circuit 607 calculates a weighted greenvalue G_(w) based on the target pixel's horizontal pixel neighborsaccording to Equation 1:

$\begin{matrix}{G_{w} = {\frac{G_{1} + G_{2}}{2} \cdot F_{gain}}} & (1)\end{matrix}$

where F_(gain) represents gain, G₁ and G₂ represents the pixel values ofthe target pixel's neighboring green pixels. In one embodiment, gainF_(gain) is the ratio of white balance gain on green to white balancegain on a color component of target pixel E when white balance gain hasnot been applied to the raw input image data 601. Gain F_(gain) iscalculated by the CPU based on a white balance analysis of the raw inputimage data 601 from the statistics data collected by the imagestatistics module 304. Due to the image sensor 202's differentsensitivity to different colors, green pixels have higher pixel valuesthen red pixels and blue pixels. To make a neutral color (e.g., gray)have the same red, blue, and green values, different white balance gainis applied to different colors. For example, higher gain is used for redand blue pixels compared to green pixels. Since green pixel values areused to clamp pixel values of red or blue pixels, inverse white balancegain is applied to green pixel values so that when white balance gain islater applied, a neutral color would still be neutral. However, if whitebalance gain is applied before, F_(gain) would be set to 1. In someembodiments, the weighted green value G_(w) is directly proportional toa weighted value of gain F_(gain). In some embodiments, the weightedgreen value G_(w) is directly proportional to a weighted value of G₁ andG₂ respectively, or in combination.

The clamp circuit 607 generates the clamp delta value 619 for each pixel(e.g., red and blue pixels) based on the lowest and highest pixel valuesof the target pixel's vertical neighboring pixels, the weighted greenvalue G_(w), the residual delta value 615 for the target pixel, theadjusted raw pixel value 627 for the target pixel, and the residualdelta value 615 for the target pixel according to either Equation 2 or 3shown below.

if (adjustedRawPixelValue>G _(w)) and (residualDeltaValue<0)clampedDeltaValue=highest(residualDeltaValue,highest(G_(w),lowestVerticalNeighbor)−adjustedRawPixelvalue)  (2)

if (adjustedRawPixelValue<G _(w)) and (residualDeltaValue>0)clampedDeltaValue=lowest(residualDeltaValue, lowest(G _(w),highestVerticalNeighbor)−adjustedRawPixelValue)  (3)

If the adjusted raw pixel value for a target pixel is greater than theweighted green value G_(w) of the target pixel's green pixel neighborsand the residual delta value 615 for the target pixel is less than zero,the clamp circuit 607 generates the clamped delta value 619 according toEquation 2 shown above. However, if the adjusted raw pixel value for atarget pixel is less than the weighted green value G_(w) of the targetpixel's green pixel neighbors and the residual delta value 615 for thetarget pixel is greater than zero, the clamp circuit 607 generates theclamped delta value 619 according to Equation 3 shown above. If theconditions of Equation 2 and Equation 3 are not satisfied, the clampcircuit 607 outputs a value of zero as the clamped delta value 619. Thatis, the clamp circuit 607 will maximally clamp the degree of residualsharpening applied to each pixel value included in the raw input imagedata 601.

In one embodiment, the clamp circuit 607 outputs the clamped delta value619 for each target pixel to the adder circuit 621 included in thesummation circuit 609. The adder circuit 621 is an adder that adds theadjusted raw pixel value 627 of each target pixel from the raw inputimage data 601 with its corresponding clamped delta value 619 output bythe clamp circuit 607 to generate the corrected raw image data 623 forthe target pixel. The corrected raw image data 623 for a target pixel isa sharpened pixel value for the target pixel that is clamped to reducesharpening overshoot as well as to reduce ACA. The corrected raw imagedata 623 for the subset of pixels from the raw image data 623 (e.g., redand blue pixels) and the raw input image data 601 for the remainingcolor of pixels that was not corrected (e.g., green pixels) can be usedby the image signal processor 206 to generate a full-color image withreduced axial chromatic aberrations.

FIG. 8 is a flowchart illustrating a method of performing axialchromatic aberration reduction to reduce color fringing of raw imagedata, according to one embodiment. The steps of the method may beperformed in different orders, and the method may include different,additional, or fewer steps.

In one embodiment, CAR circuit 307 receives 801 pixel values of pixelsof a color in raw input image data. The color may be red or blue, butnot green for example. The CAR circuit 307 generates 803 sharpeningvalues for the pixel values. The sharpening values for the pixel valuesreduce axial chromatic aberrations in the full-color image. However, thesharpening values may over sharpen the image resulting in artifacts(e.g., artificial colors) in the full-color image. Thus, the CAR circuit307 generates 805 a clamp value for each sharpening value that limitsthe amount of sharpening applied to each pixel value.

The CAR circuit 307 generates 807 corrected pixel values for the red andblue pixels in the raw image data based on the clamp values. Thecorrected pixel values for the red and blue pixels are sharpened pixelvalues that reduce the axial chromatic aberration while also reducingartifacts from over sharpening. The CAR circuit 307 then outputs 809 foreach red and blue pixel either the corrected pixel value or the receivedpixel value in the raw input image data as an output value for the redand blue pixel.

While particular embodiments and applications have been illustrated anddescribed, it is to be understood that the invention is not limited tothe precise construction and components disclosed herein and thatvarious modifications, changes and variations which will be apparent tothose skilled in the art may be made in the arrangement, operation anddetails of the method and apparatus disclosed herein without departingfrom the spirit and scope of the present disclosure.

1. An image processor comprising: a first sharpening circuit configuredto: receive pixel values of pixels of a color in a raw input image data;and generate for each of the received pixel values a sharpening valuethat increases sharpness of the corresponding pixel; a sharpening clampcircuit coupled to the first sharpening circuit and configured toreceive the sharpening value for each of the received pixel values fromthe first sharpening circuit, and generate a clamped value for each ofthe received pixel values as a function of the sharpening value for thecorresponding pixel value, the clamped value limiting a degree ofsharpening applied to each pixel value; and a summation circuit coupledto the first sharpening circuit and the sharpening clamp circuit, thesummation circuit configured to generate for each received pixel value acorresponding corrected pixel value as a function of the received pixelvalue and the clamped value associated with the received pixel value,and output the corresponding corrected pixel value.
 2. The imageprocessor of claim 2, wherein the sharpening clamp circuit comprises: asecond sharpening circuit coupled to the first sharpening circuit, andconfigured to generate a residual delta value for each received pixelvalue based on a difference between the sharpening value for eachreceived pixel value and a product of a predetermined sharpeningstrength for all of the pixel values and the sharpening value; and aclamp circuit coupled to the second sharpening circuit, and configuredto receive the residual delta value for each received pixel value, andgenerate the clamped value for each of the received pixel values as afunction of the residual delta value.
 3. The image processor of claim 2,wherein the clamp circuit is configured to generate the clamped valuefor each of the received pixel values based on pixel values of aplurality of neighboring pixels in a first direction that are of a samecolor as the pixel corresponding to the received pixel value, and pixelvalues of a plurality of neighboring pixels in a second direction thatare of a different color than the pixel.
 4. The image processor of claim3, wherein the clamp circuit is configured to generate the clamp valuefor each of the received pixel values by: determining a highest pixelvalue from the pixel values of the plurality of neighboring pixels inthe first direction; determining a lowest pixel value from the pixelvalues of the plurality of neighboring pixels in the first direction;and calculating a weighted average pixel value of the plurality ofpixels in the second direction as a function of pixel values of theplurality of pixels and a white balance gain; wherein the clamped valuefor each of the received pixel values is generated as a function of thehighest pixel value, the lowest pixel value, the weighted average pixelvalue that corresponds to the received pixel value, and the residualdelta value.
 5. The image processor of claim 4, wherein the summationcircuit is configured to generate for each received pixel value thecorrected pixel value by summing the received pixel value, the productof the predetermined sharpening strength and the sharpening value forthe pixel value, and the clamped value for the received pixel value. 6.The image processor of claim 4, wherein responsive to a sum of areceived pixel value of a pixel and the product of the predeterminedsharpening strength and the sharpening value for the pixel value beinggreater than the weighted average pixel value, and the residual deltavalue being less than zero, the corrected pixel value for the receivedpixel is determined as a function of the residual delta value, theweighted average pixel value of the plurality of pixels in the seconddirection, the lowest pixel value from the pixel values of the pluralityof neighboring pixels in the first direction, and a sum of the receivedpixel value and the product of the predetermined sharpening strength andthe sharpening value for the received pixel value.
 7. The imageprocessor of claim 6, wherein responsive to the sum of the receivedpixel value of the pixel and the product of the predetermined sharpeningstrength and the sharpening value for the pixel value being less thanthe weighted average pixel value, and the residual delta value beinggreater than zero, the corrected pixel value for the received pixel isdetermined as a function of the residual delta value, the weightedaverage pixel value of the plurality of pixels in the second direction,the highest pixel value from the pixel values of the plurality ofneighboring pixels in the first direction, and the sum of the receivedpixel value and the product of the predetermined sharpening strength andthe sharpening value for the received pixel value.
 8. The imageprocessor of claim 1, wherein the raw input image data and the clampedpixel values are in a Bayer pattern.
 9. The image processor of claim 1,wherein receiving pixel values of pixels of the color in the raw inputimage data includes receiving pixel values of pixels in colors of red,green, and blue, and wherein the first sharpening circuit is configuredto generate sharpening values for pixel values of two of the colors butdoes not generate sharpening values for pixel values of a remaining oneof the colors.
 10. The image processor of claim 9, wherein the twocolors are blue and red, and the remaining one of the colors is green.11. A method comprising: receiving pixel values of pixels of one or morecolors in a raw input image data; generating for each of the receivedpixel values a sharpening value that increases sharpness of thecorresponding pixel; generating a clamped value for each of the receivedpixel values as a function of the sharpening value for the correspondingpixel value, the clamped value limiting a degree of sharpening appliedto each pixel value; generating for each received pixel value acorresponding corrected pixel value as a function of the received pixelvalue and the clamped value associated with the received pixel value;and outputting for each received pixel value the corresponding correctedpixel value.
 12. The method of claim 11, further comprising: generatinga residual delta value for each received pixel value based on adifference between the sharpening value for each received pixel valueand a product of a predetermined sharpening strength for all of thepixel values and the sharpening value; and generating the clamped valuefor each of the received pixel values as a function of the residualdelta value.
 13. The method of claim 12, wherein generating the clampedvalue for each of the received pixel values is further generatedaccording to pixel values of a plurality of neighboring pixels in afirst direction that are of a same color as the pixel corresponding tothe received pixel value, and pixel values of a plurality of neighboringpixels in a second direction that are of a different color than thepixel.
 14. The method of claim 13, wherein generating the clamp valuefor each of the received pixel values comprises: determining a highestpixel value from the pixel values of the plurality of neighboring pixelsin the first direction; determining a lowest pixel value from the pixelvalues of the plurality of neighboring pixels in the first direction;and calculating a weighted average pixel value of the plurality ofpixels in the second direction as a function of pixel values of theplurality of pixels and a white balance gain; wherein the clamped valuefor each of the received pixel values is generated as a function of thehighest pixel value, the lowest pixel value, and the weighted averagepixel value that corresponds to the received pixel value.
 15. The methodof claim 14, wherein generating for each received pixel value thecorresponding corrected pixel value comprises: summing the receivedpixel value, the product of the predetermined sharpening strength andthe sharpening value for the pixel value, and the clamped value for thereceived pixel value.
 16. The method of claim 14, further comprising:responsive to a sum of a received pixel value of a pixel and the productof the predetermined sharpening strength and the sharpening value forthe pixel value being greater than the weighted average pixel value, andthe residual delta value being less than zero, the corrected pixel valuefor the received pixel is determined as a function of the residual deltavalue, the weighted average pixel value of the plurality of pixels inthe second direction, the lowest pixel value from the pixel values ofthe plurality of neighboring pixels in the first direction, and a sum ofthe received pixel value and the product of the predetermined sharpeningstrength and the sharpening value for the received pixel value.
 17. Themethod of claim 16, further comprising: wherein responsive to the sum ofthe received pixel value of the pixel and the product of thepredetermined sharpening strength and the sharpening value for the pixelvalue being less than the weighted average pixel value, and the residualdelta value being greater than zero, the corrected pixel value for thereceived pixel is determined as a function of the residual delta value,the weighted average pixel value of the plurality of pixels in thesecond direction, the highest pixel value from the pixel values of theplurality of neighboring pixels in the first direction, and the sum ofthe received pixel value and the product of the predetermined sharpeningstrength and the sharpening value for the received pixel value.
 18. Themethod of claim 11, wherein the raw input image data and the clampedpixel values are in a Bayer pattern.
 19. The method of claim 11, whereinreceiving pixel values of pixels of the one or more colors in the rawinput image data includes receiving pixel values of pixels in colors ofred, green, and blue, and wherein sharpening values for pixel values oftwo of the colors are generated but sharpening values for pixel valuesof a remaining one of the colors are not generated.
 20. A systemcomprising: an image sensor comprising configured to capture an imagedata; an image processor comprising: a first sharpening circuitconfigured to: receive pixel values of pixels of a color in a raw inputimage data; and generate for each of the received pixel values asharpening value that increases sharpness of the corresponding pixel; asharpening clamp circuit coupled to the first sharpening circuit andconfigured to receive the sharpening value for each of the receivedpixel values from the first sharpening circuit, and generate a clampedvalue for each of the received pixel values as a function of thesharpening value for the corresponding pixel value, the clamped valuelimiting a degree of sharpening applied to each pixel value; and asummation circuit coupled to the first sharpening circuit and thesharpening clamp circuit, the summation circuit configured to generatefor each received pixel value a corresponding corrected pixel value as afunction of the received pixel value and the clamped value associatedwith the received pixel value, and output the corresponding correctedpixel value.